import { useState } from "react";
import Dad from "./pages/Dad/Dad";
import Context from "./utils/context";
const App = () => {

  const [count, setCount] = useState(20);

  const clickBtn = () => {
    setCount(count + 20)
  }
  return (
    <>
      <h1>获取组件数据</h1>
      <button onClick={clickBtn}>更改count</button>
      <Context.Provider value={count}>
        <Dad />
      </Context.Provider>
    </>
  )
}

export default App;